import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('@/views/HomeView.vue'),
    },{
      path: '/login',
      name: 'login',
      component: () => import('@/views/LoginView.vue')
    },{
      path: '/register',
      name: 'register',
      component: () => import('@/views/RegisterView.vue')
    },{
      path: '/course',
      name: 'course',
      component: () => import('@/views/CourseView.vue')
    },{
      path: '/course/detail',
      name: 'course-detail',
      component: () => import('@/views/CourseDetailView.vue')
    },{
      path: '/coach',
      name: 'coach',
      component: () => import('@/views/CoachView.vue')
    },{
      path: '/coach/detail',
      name: 'coach-detail',
      component: () => import('@/views/CoachDetailView.vue')
    },{
      path: '/news',
      name: 'news',
      component: () => import('@/views/NewsView.vue')
    },{
      path: '/news/detail',
      name: 'news-detail',
      component: () => import('@/views/NewsDetailView.vue')
    },{
      path: '/reservePay',
      name: 'reserve-pay',
      component: () => import('@/views/ReservePayView.vue')
    },{
      path: '/profile',
      name: 'profile',
      component: () => import('@/views/profile/ProfileView.vue'),
      children: [
        {
          path: 'setPassword',
          name: 'set-password',
          component: () => import('@/views/profile/SetPasswordView.vue')
        },{
          path: 'fitnessPlan',
          name: 'fitness-plan.ts',
          component: () => import('@/views/profile/FitnessPlanView.vue')
        },
        {
          path: 'updateProfile',
          name: 'update-profile',
          component: () => import('@/views/profile/UpdateProfileView.vue')
        },
        {
          path: 'myCourse',
          name: 'my-course',
          component: () => import('@/views/profile/MyCourseView.vue')
        },
        {
          path: 'myCourseDetail',
          name: 'my-course-detail',
          component: () => import('@/views/profile/MyCourseDetailView.vue')
        },
        {
          path: 'myMessage',
          name: 'my-message',
          component: () => import('@/views/profile/MyMessageView.vue')
        },
        {
          path: 'myReservation',
          name: 'my-reservation',
          component: () => import('@/views/profile/MyReservationView.vue')
        },
        {
          path: 'myWallet',
          name: 'my-wallet',
          component: () => import('@/views/profile/WalletRechargeView.vue')
        },
        {
          path: 'historyBilling',
          name: 'history-billing',
          component: () => import('@/views/profile/HistoryBillingView.vue')
        }
      ]
    },{
      path: '/about',
      name: 'about',
      component: () => import('@/views/AboutView.vue')
    }
  ],
})

export default router
